home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 16
/
Aminet 16 (1996)(GTI - Schatztruhe)[!][Dec 1996].iso
/
Aminet
/
util
/
misc
/
Cookies.lha
/
Cookies
/
Cookies.doc
< prev
next >
Wrap
Text File
|
1996-09-19
|
10KB
|
272 lines
Cookies version 4.3
===================
1. What is Cookies?
-------------------
Cookies is two things:
a/ A little fortune cookie program (can be quite funny)
b/ A complete waste of disk space (it isn't particularly useful)
2. Installing Cookies
---------------------
Umm, this is *really* tricky :-) Just drag the Cookies and Cookies.dat
icons to where-ever you wanna put the program. Works off floppy or
hard drive. There are no assigns to put in Startup-Sequence or
anything. This is a good thing because no-one would want to bother
with assigns for a fortune cookie program.
In addition, if you want to use the program from Workbench, the
reqtools.library must be installed in LIBS: Cookies needs version 38
or above of reqtools.library. This version has been included in the
archive. If you already have reqtools.library v38 or above installed,
do *not* reinstall from this version. However, if you do not have
reqtools.library installed, or have an old version, you should copy
the supplied version into your LIBS: directory. The version supplied
will work on all versions of AmigaOS from 1.3 up. You must also have
powerpacker.library version 33 or above. A suitable version is
supplied in this archive, if you don't already have one.
3. Using Cookies
----------------
A. From Workbench
Double click on the icon. The program will check that Cookies.dat is
in the current directory and will refuse to run if it isn't. Assuming
you followed the highly technical installation procedure outlined
above, Cookies will open its window and display a random message from
the text file.
The Cookies window has four buttons along the bottom; these are:
ANOTHER SPECIFIC ABOUT QUIT
Clicking ANOTHER will pick another cookie at random and display it.
By clicking SPECIFIC, you can pick a cookie from the file to display.
It will open a window with a prompt in; you then enter the cookie
number that you want. For example, if Cookies.dat contains 100
cookies, you can enter a number from 1 to 100. So, if you have a
lucky number, you can see which cookie it corresponds to!
Clicking ABOUT opens a window with the program credits in.
Clicking QUIT err... quits.
You can run Cookies from your WBStartup drawer. Just drag its icon
into the drawer, along with Cookies.dat. WARNING: if you do this, you
must delete Cookies.dat's icon using the Shell. To recap: to run the
program from WBStartup, the following three files have to go in the
drawer:
Cookies
Cookies.info
Cookies.dat
*NOT* Cookies.dat.info. This will cause problems! Also, make sure
that Cookies.info has the DONOTWAIT tooltype set.
B. From Shell
Ensure that you are in the directory in which you have placed Cookies.dat.
Type
cookies
at the Shell prompt. The program will pick a cookie, display it in
the Shell window, and exit. This is good for generating random
.signature files for email. You could put something like
cookies >S:.signature
in your Startup-Sequence and have a different email signature every
time you boot.
Cookies takes one switch from the Shell: WINDOW. It instructs the
program to act as if it is run from Workbench. So you could do
something like
run <NIL: >NIL: cookies window
in your Startup-Sequence and have it run everytime you boot up, just
for laughs!
If you run in the Shell without WINDOW mode on, it won't attempt to
open reqtools.library, as the requester functions are not needed just
for writing to the Shell. So if you can't/don't/won't install
reqtools.library, you can still use Cookies. You lucky people! :-)
4. Cookies.dat file format
--------------------------
You put the messages one by one in the file, with a blank line between
each one, and the cursor stopping on a blank line at the end of the
file. For example, a legal (but short) Cookies.dat would be:
No matter where you go, there you are.
"Doctor, Doctor, I've broken my arm in three places."
"Then you shouldn't go to those places"
Life, don't talk to me about life...
#
(The hash symbol represents where the cursor finishes up in the
editor. There are no lines after this). The above file contains
three cookies; the first and third have one line each; the second has
two lines. You may have up to nine lines per cookie. Examine the
included Cookies.dat to get to know the file format; it really is
easy. Once you've got to grips with it (which should take all of two
seconds), you can add more cookies to it. I keep mine in alphabetical
order; this is not compulsory.
NOTE: if you have Cookies version 0.42 or below, you can simply rename
your existing Cookies.txt file as Cookies.dat. The formats are the
same.
I got these cookies mainly from the fortune.txt file in with the
NorthC distribution by Steve Hawtin. I removed the rude ones and
added some more. I also changed the file format to make it easier (I
think :-) to process. My program code is not based in any way on
Steve's; it is my own work.
5. Powerpacker support
----------------------
Cookies.dat can be compressed with Nico François' Powerpacker, or any
other cruncher that produces Powerpacker-compatible data files. There
are a number of PD Powerpacker-compatible crunchers available. So all
you Powerpacker freaks who like everything on your hard drive to be
crunched can now have even more fun! Plus, when a crunched
Cookies.dat gets loaded, the pointer flashes in a cute fashion! It's
worth getting hold of a Powerpacker clone for this reason alone! (or
not... :-)
If you decide to crunch your Cookies.dat, then *DO NOT* append the .pp
file suffix to it. Cookies expects the file to be called Cookies.dat,
and *NOTHING* else.
6. Bugs and limitations
-----------------------
Cookies.dat is limited to 65,535 cookies. This should not be a problem
for most people :-)
Cookies can be SLOOOOOOW from floppy disk. Sorry :-( It runs at a
perfectly acceptable speed from hard disk.
Cookies has been tested under AmigaOS 1.3 and 3.1 It performed
admirably.
7. History
----------
- Cookies v0.1
· Pitiful, bugged, lame... it worked (just); that was about all.
- Cookies v0.2
· Now we are getting somewhere. This version was cleaner. There's a
lot wrong with it though - window opens quite big, no matter how long
the message. You can only display one message; then you have to quit
and re- load (yawn).
- Cookies v0.21
· A bug fix - the window title sometimes got corrupted.
- Cookies v0.22
· The window now re-sizes around the message.
· Some more bugs fixed, and lots of little changes to the code.
- Cookies v0.30
· File handling is now a little faster, though not as fast as I'd
like...
· Window initially opens as small as possible, and expands to accomodate
the message.
· More memory efficient.
· Text has 1 pixel extra space between lines (easier to read)
· This is the first 'multiple-cookie' version - you can now load another
cookie by pressing the right mouse button when the window is active.
This is a time saver if you happen to be in a cookie mood.
· Code reorganized using ARP library to make my life easier.
- Cookies v0.31 PUBLIC RELEASE
· Got rid of ARP; I could manage okay without.
- Cookies v0.32 PUBLIC RELEASE
· Code cleaned up a little; now a bit more efficient. Functionality is
exactly the same as v0.31.
- Cookies v0.32a, b, c
· Bug fixes and code cleanup. Recompiled using AmigaOS 3.1 includes
- Cookies v0.4
· First Reqtools version. Now opens a nice window with buttons and stuff.
· 'About' feature added
- Cookies v0.41 PUBLIC RELEASE
· 'Specific' feature added
· Now can print a cookie straight to Shell window, doesn't need reqtools
for this
- Cookies v0.42
· Now buffers the entire Cookies.txt file into RAM if sufficient mem is
available. This speeds up searching incredibly.
- Cookies v0.43
· Powerpacker support added.
· Cookies.txt renamed Cookies.dat, in recognition that it might be a
Powerpacker data file, not a text file, and so .txt might be a
misleading identifier, or something.
- Cookies v4.3 PUBLIC RELEASE
· Functionally identical to v0.43, but renumbered in keeping with
standard Amiga software numbering schemes.
8. Plans for the future
-----------------------
Rewrite without Reqtools, using just Intuition stuff.
Add support for Cookies.dat to be XPK compressed.
9. All about me
---------------
I am a student with enough spare time to write useless programs in Pascal;
I'm not actually wasting my time; this is good practice. It also beats
coding Amiga stuff in C, which is (1) confusing and (2) expensive. This
proggy was written in HS Pascal, which was not that cheap, but cheaper (and
friendlier :-) than C.
If you wanna contact me, you can do so by email during University term time.
Just point your mailer at:
steffan@dcs.warwick.ac.uk
or you can send snail mail to:
Stephen Williams,
9, Helmsley Way,
Spalding,
Lincolnshire,
PE12 6BG,
England.
I also have a World Wide Web page:
http://www.warwick.ac.uk/~csuxg/
Please pass Cookies on to your Amiga-owning friends. It's fun and, well,
somebody might like it. Perhaps.
10. Legal matters
-----------------
powerpacker.library, reqtools.library and associated development tools
are copyright © by Nico Francois.
Cookies is copyright © by Stephen Williams (no, Steffan is not my
real name :-)
Cookies is freeware. It may be uploaded to bulletin boards and
distributed by PD libraries, provided only a nominal charge is made
for distribution.
Cookies may not be included in any commercial package, including
magazine cover disks, without the permission of the author. Cookies
is not in the public domain. It may not be modified in any way.
No-one may make any profit from Cookies.